package com.yzr.common.thread;

/**
 * @description 树形结构构建
 * @author: yx-0173
 * @date: 2021-08-03 16:50
 **/
public class TreeUtil {

    /*public List<T> conStruct(List<? extends T> list) {
        List<T> collect = list.stream()
                .filter(e -> "0".equals(e.getParentCode()))
                .peek(e -> e.setCategoryChild(getCategoryChild(e, categoryDOList)))
                .collect(toList());
    }

    private List<DeviceCategoryDO> getCategoryChild(DeviceCategoryDO categoryDO, List<DeviceCategoryDO> categoryList) {
        return categoryList.stream()
                .filter(e -> Objects.equals(e.getParentCode(), categoryDO.getCode()))
                .peek(e -> e.setCategoryChild(getCategoryChild(e, categoryList))).collect(toList());
    }*/
}
